package com.hspedu.enum_;

/**
 * @Author Stringzhua
 * @Date 2024/3/6 21:20
 * description:
 */
public class EnumExercise01 {
    public static void main(String[] args) {
        Gender2 boy = Gender2.BOY;//ok
        Gender2 boy2 = Gender2.BOY;//ok
        System.out.println(boy);//BOY
        /*
         * public String toString(){
         *   return name;
         * }
         * */
        System.out.println(boy2 == boy);//true
    }
}

enum Gender2 {//父类Enum的toString
    BOY, GIRL;
}
